Lua Scripting
API Definition Setup
To get started with Lua scripting in Mupen64, you should set up your project to use the API definitions.
You can find the API definitions as api.lua in the repack.
- Create a
./libdirectory at the root of your project - Copy
api.luainto./lib - Add
libtoworkspace.libraryin your.luarcconfig at the root of your project
Most IDEs should now automatically recognize the API definitions and provide code completion and type checking.
It's not necessary to require or dofile the API definitions in your scripts; Mupen has its own internal copy that's automatically loaded.
Make sure to update the api.lua file in your ./lib directory whenever you update Mupen64.